<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Cache-control" content="no-cache,no-store,must-revalidate,max-age=3" />
	<meta http-equiv="Expires" content="Mon, 26 Jul 1997 05:00:00 GMT" />
	<meta name="author" content="dsaiyin.com" />
	<meta name="license" content="LGPL" />
	<title>会员注册</title>
    <link rel="stylesheet" href="__PUBLIC__/Public/css/member.css"/>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Public/css/style.css" />
    <script type="text/javascript" src="__PUBLIC__/Public/js/jquery.min.1.11.3.js" charset="utf-8"></script>
    <!--[if IE]>
    <script type="text/javascript" src="__PUBLIC__/Public/js/html5.js" charset="utf-8"></script>
    <![endif]-->
    <script type="text/javascript" src="__PUBLIC__/Public/js/global.js" charset="utf-8"></script>


    <style type="text/css">
        #topBar{
            background: #0a0;
        }
        .panelLine .inputText{
            padding: 0px;
            height: 30px;
        }
        .panelLine{
            clear: both;
            height: 40px;
            padding: 0px;
        }
        #tips{
            display: block;
            padding: 0px;
            width: 30px;
            height: 30px;
            float: left;
        }
        .tips{
            display: block;
            padding: 0px;
            width: 150px;
            height: 30px;
            float: left;
        }
        #container{
            background: url("__PUBLIC__/Public/images/logbg.jpg") no-repeat;
            background-size: 100% 100%;
            min-height:895px;
            padding-top: 50px;
        }
    </style>
	
</head>
<body>
<div id="container">
    <div id="topBar">
        <a href="/login" class="floatRight btn bar_btn mr20" style="color: #fff">登录</a>

        <div id="logo" class="floatLeft mr10 ml20 mt10"><img src="__PUBLIC__/Public/images/logo.png" alt="裕鸟国家货运" /></div>
        <div id="links" class="floatLeft">

            <a href="/" target="_self">网站首页</a>
            <a href="/company" target="_self">公司简介</a>
            <a href="/news" target="_self">网站公告</a>
            <a href="/help" target="_self">帮助中心</a>
            <a href="/contactus" target="_self">联系我们</a>

        </div>
    </div>
    <script type="text/javascript">
var open_vcode = '1';
$(document).ready(function(){
	$("#register-form").submit(function(){
		if(!$('#is_ok').attr('checked'))
		{
			alert('注册前请先同意本站协议');
			return false;
		}
		$(this).ajaxSubmit({
			type:'post',
			url: api_url('register','save'),
			dataType:'json',
			success: function(rs){
				if(rs.status == 'ok')
				{
					alert("恭喜您注册成功,请先完善个人账户信息，再进行相关操作！");
					//var back = $("#_back").val();
					//if(!back || back == 'undefined' || back == window.location.href) back = webroot;
					$.phpok.go('http://zhuanyun3.5144free.cn/index.php?c=usercp&f=info');
				}
				else
				{
					if(!rs.content) rs.content = '注册失败';
					alert(rs.content);
					if(open_vcode == '1')
					{
						$("#_chkcode").val('');
						$("#update_vcode").phpok_vcode();
					}
					return false;
				}
			}
		});
		return false;
	});
});
//更新会员组
function update_group(gid)
{
	$.phpok.go(get_url('register','','group_id='+gid));
}
function agreement(){
    var url = get_url('register','agreement');
    var title = '注册协议';
    $.dialog.open(url,{
        'title':title,
        'lock':true,
        'width':'400px',
        'height':'438px',
        'cancel':function(){
            return true;
        }
    });
}
</script>
<div id="centerBox">
	<div class="formBlock formBlockRegister floatLeft">

		<div id="formTitle" class="f16">感谢您注册裕鸟国际</div>
		<div id="formSection">
			<form method="post" id="register-form" action="/register">
				<div class="panelLine clearfix">
					<span class="ls floatLeft lbl">会员组：</span>
					<select name="group_id" onchange="update_group(this.value)">
						<option value="2" selected>普通会员</option>
					</select>
				</div>
				<div class="panelLine clearfix">
					<span class="ls floatLeft lbl">用户名</span>
					<input name="account" id="account" value="" class="inputText floatLeft ls long " required type="text" placeholder="请输入账号">
                    <span class="tips"></span>
				</div>
				<div class="panelLine clearfix">
					<span class="ls floatLeft lbl">密码</span>
					<input name="password" id="password" value="" class="inputText floatLeft ls long " required type="password" placeholder=" 请输入密码">
				</div>
				<div class="panelLine clearfix">
					<span class="ls floatLeft lbl">确认密码</span>
					<input name="chkpass" id="chkpass" class="inputText floatLeft ls long " required type="password"value="" placeholder="再次输入密码">
                    <span class="tips"></span>
				</div>
				<div class="panelLine clearfix">
					<span class="ls floatLeft lbl">邮箱</span>
					<input name="email" value="" id="email" class="inputText floatLeft ls long " required type="text" placeholder="请输入邮箱">
				    <span class="tips"></span>
                </div>
				<div class="panelLine clearfix">
					<span class="ls floatLeft lbl">手机</span>
					<input name="mobile" id="mobile" class="inputText floatLeft ls long " required type="text" placeholder="请输入手机">
				    <span class="tips"></span>
                </div>
								<div class="panelLine clearfix">
					<span class="ls floatLeft lbl">验证码</span>
					<input id="check" name="check" class="inputText floatLeft ls harflong " required type="text" placeholder="请输入验证码">
                                    <span id="tips" class="tips"></span>
					<img src="/login/yzm" border="0" align="absmiddle" id="vcode" title="点击切换验证码" style="cursor:pointer;"/>
				</div>

								<div style="margin-top:15px;">
				<button class="stdColorButton">立即注册&nbsp;&nbsp;<span class="iconfont">󰅭</span></button>
					<span style="padding-left:20px">
						<input type="checkbox" name="is_ok" id="is_ok" checked />&nbsp;我已看过并同意&nbsp;
						<a class="blue" href="javascript:agreement();void(0);">服务协议</a>
					</span>

				</div>
			</form>
            <div style="margin-top:15px;"></div>
        </div>
	</div>
	<div id="agreement" class="floatLeft">
			<div class="quoteBox"><p>裕鸟国际快递专为“海外购物爱好者”及“代购服务提供者”提供海外到中国的包裹代收国际转运服务，只要您在购物时候，正确填写指定的仓库收货地址并注明正确的客户识别码；</p><p>在包裹到达我们仓库之前，根据购物网站提供的“美国快递单号”创建好“转运预报”，如实申报内件信息。工作人员在签收该包裹后，打印粘贴好您预先创建好的转运面单，将包裹发往中国大陆。 <br/></p>			</div>
	</div>
	<div class="" style="clear: both; height: 100px"></div>
</div>

    <div class="tc f12">Copyright (c) 2012-2016 All Rights. </div>
</div>


<script type="text/javascript">
    $("#chkpass").blur(function(){
        if($(this).val().length>1) {
            if ($(this).val() !=  $("#password").val()) {
                $(this).next().text("输入密码不一致").css("color","#f00");
            } else {
                $(this).next().text("");
            }
        }

    })
    $("#email").blur(function(){
        if($(this).val().length>1) {
            var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
            if (!myreg.test($(this).val())) {
                $(this).next().text('请输入有效的E_mail！').css("color","#f00");
            } else {
                $(this).next().text('');
            }
        }
    })
    $("#mobile").blur(function(){
        if($(this).val().length>0){
            var mobile=/^1([3458]\d)\d{8}$/;
            if(!mobile.test($(this).val())){
                $(this).next().text("请输入正确的手机号").css("color","#f00");
            }else{
                $(this).next().text("");
            }
        }
    })


    $("#account").keyup(function(chk){
        if($(this).val().length>0) {
            $.getJSON("/login/accunt", {account: $(this).val()}, function (smg) {
                if (smg) {
                    $("#account").next().text("可以注册").css("color", "#0a0");
                } else {
                    $("#account").next().text("已注册").css("color", "#f00");
                }
            })
        }
    })
    var yzmid;
    $("#vcode").click(function(){
        yzmid=Math.random();
        $(this).attr("src", "/login/yzm/id/"+yzmid);
        $("#vid").val(yzmid);
    });
    $("#check").keyup(function(){
        if($(this).val().length>=4){
            $.getJSON("/login/check",{yzm:$(this).val(),id:yzmid},function(smg){
                if(smg){
                    $("#tips").text("正确").css("color","#0a0");
                }else{
                    $("#tips").text("错误过期").css("color","#f00");

                }
            })
        }
    });


</script>
</body>
</html>
